package cn.sh.yhk.configure.redis.session;


/**
 * @Auther: adminyhk
 * @Date: 2018/11/1 18:57
 * @Description: maxInactiveIntervalInSeconds 1800-300
 * 这300实在找不到哪里
 */
//@Configuration
//@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 1500)
public class SpringSessionConfiguration {

//    @Resource
//    UserService userService;
//
//    /**
//     * Redis内session过期事件监听
//     */
//    @EventListener
//    public void onSessionExpired(SessionExpiredEvent expiredEvent) {
//        String sessionId = expiredEvent.getSessionId();
//        userService.truncateSesion(sessionId);
//        System.out.println("onSessionExpired:" + sessionId);
//    }
//
//
//    /**
//     * Redis内session删除事件监听
//     */
//    @EventListener
//    public void onSessionDeleted(SessionDeletedEvent deletedEvent) {
//        String sessionId = deletedEvent.getSessionId();
//        userService.truncateSesion(sessionId);
//        System.out.println("onSessionDeleted:" + sessionId);
//
//    }
//
//    /**
//     * Redis内session保存事件监听
//     */
//    @EventListener
//    public void onSessionCreated(SessionCreatedEvent createdEvent) {
//        String sessionId = createdEvent.getSessionId();
//        System.out.println("onSessionCreated:" + sessionId);
//    }

}
